package com.zjxf.utils;

import com.zjxf.base.bean.po.LHNTTravelPlan;
import com.zjxf.base.bean.vo.VoCmsTravelPlan;

/**
 * Created with IntelliJ IDEA.
 *
 * @author lihaonan
 * date: 2021/4/110 20:56
 * descriptioge: 实体转换
 */
public class VoChangeUtils {

    /**
     * vo转换po,进行时间处理
     * @param savePlan
     * @return
     */
    public static LHNTTravelPlan voChangePo(VoCmsTravelPlan.savePlan savePlan){
        LHNTTravelPlan lhntTravelPlan = new LHNTTravelPlan();
        lhntTravelPlan.setStartTime(DateUtils.parseDateTime(savePlan.getStartTime(),"yyyy-MM-dd HH:mm:ss"));
        lhntTravelPlan.setEndTime(DateUtils.parseDateTime(savePlan.getEndTime(),"yyyy-MM-dd HH:mm:ss"));
        lhntTravelPlan.setIdCard(savePlan.getIdCard());
        lhntTravelPlan.setPhone(savePlan.getPhone());
        lhntTravelPlan.setTravelMode(savePlan.getTravelMode());
        lhntTravelPlan.setSex(savePlan.getSex());
        lhntTravelPlan.setRouteId(savePlan.getRouteId());
        lhntTravelPlan.setUserName(savePlan.getUserName());
        return lhntTravelPlan;
    }
}
